// adminSessionBean.java

// Start: $Id: remote.vm 7202 2005-08-10 16:24:21Z el-vadimo $
package adminSession;

import java.rmi.RemoteException;

import javax.ejb.CreateException;
import javax.ejb.EJBObject;
import javax.ejb.FinderException;
import javax.ejb.RemoveException;
import javax.naming.NamingException;

import descriptor.AcademicSupDescriptor;
import descriptor.AcademicSupListDescriptor;
import descriptor.AdminDescriptor;
import descriptor.AdminsListDescriptor;
import descriptor.CareerDescriptor;
import descriptor.CareersListDescriptor;
import descriptor.CitiesListDescriptor;
import descriptor.CityDescriptor;
import descriptor.CompaniesListDescriptor;
import descriptor.CompanyDescriptor;
import descriptor.CompanySupDescriptor;
import descriptor.CompanySupsListDescriptor;
import descriptor.CountriesListDescriptor;
import descriptor.CountryDescriptor;
import descriptor.DegreeDescriptor;
import descriptor.DegreeListDescriptor;
import descriptor.DepartmentsListDescriptor;
import descriptor.MarkerDescriptor;
import descriptor.MarkerListDescriptor;
import descriptor.RecruiterDescriptor;
import descriptor.RecruitersListDescriptor;
import descriptor.SectorsListDescriptor;
import descriptor.StudentDescriptor;
import descriptor.StudentListDescriptor;
import descriptor.UsersListDescriptor;

/**
 * adminSessionBean remote interface
 * 
 * @author Mamadou TOURE
 * 
 * The adminSession interface defines all the business method that a client can invoke remotely 
 * on the object (adminSessionBean).
 */
public interface adminSession extends EJBObject 
{

	public boolean logged() throws RemoteException;
	public void logout() throws RemoteException;
	public void login() throws RemoteException;
	
	
	public AdminDescriptor getPersonnalInfos() throws RemoteException;
	public AcademicSupListDescriptor getAllAcademicSups() throws RemoteException;
	public AdminsListDescriptor getAllAdmins() throws RemoteException;
	public CompaniesListDescriptor getAllCompanies() throws RemoteException;
	public CompanySupsListDescriptor getAllCompanySups() throws RemoteException;
	public CountriesListDescriptor getAllCountries() throws RemoteException;
	public DegreeListDescriptor getAllDegrees() throws RemoteException;
	public RecruitersListDescriptor getAllRecruiters() throws RemoteException;
	public StudentListDescriptor getAllStudents() throws RemoteException;
	public UsersListDescriptor getAllUsers() throws RemoteException;
	public DepartmentsListDescriptor getAllDepartments() throws RemoteException;
	public CareersListDescriptor getAllCareers() throws RemoteException;
	public MarkerListDescriptor getAllMarkers() throws RemoteException;
	public CitiesListDescriptor getAllCities() throws RemoteException;
	public SectorsListDescriptor getAllSectors() throws RemoteException;
	
	
	
	public StudentListDescriptor getStudents(int[] studentsIds)throws RemoteException, FinderException, NamingException,RemoveException;
	public CompanySupsListDescriptor getCompanySupsListDescriptor(int[] companySupIds)throws RemoteException, FinderException, NamingException,RemoveException;
	public RecruitersListDescriptor getRecruiterDescriptors(int[] recruiterIds)throws RemoteException, FinderException, NamingException,RemoveException;
	
	
	
	public AcademicSupDescriptor getAcademicSupDescriptor(int userId) throws RemoteException, NamingException, CreateException, FinderException;
	public int createAcademicSup(String firstName, String surName, String login, String password, String email,int departmentId)throws RemoteException, FinderException, NamingException, CreateException;
	public int updateAcademicSup(int userId, String firstName, String surName, String login, String password, String email,int departmentId)throws RemoteException, FinderException, NamingException, CreateException;
	public void removeAcademicSup(int userId)throws RemoteException, FinderException, NamingException,RemoveException;
	
	public AdminDescriptor getAdminDescriptor(int userId) throws RemoteException, NamingException, CreateException, FinderException;
	public int createAdmin(String firstName, String surName, String login, String password, String email)throws RemoteException, FinderException, NamingException, CreateException;
	public int updateAdmin(int userId, String firstName, String surName, String login, String password, String email)throws RemoteException, FinderException, NamingException, CreateException;
	public void removeAdmin(int userId)throws RemoteException, FinderException, NamingException,RemoveException;
	
	public CareerDescriptor getCareerDescriptor(int userId) throws RemoteException, NamingException, CreateException, FinderException;
	public int createCareer(String firstName, String surName, String login, String password, String email)throws RemoteException, FinderException, NamingException, CreateException;
	public int updateCareer(int userId, String firstName, String surName, String login, String password, String email)throws RemoteException, FinderException, NamingException, CreateException;
	public void removeCareer(int userId)throws RemoteException, FinderException, NamingException,RemoveException;
	
	
	
	
	
	public CityDescriptor getCityDescriptor(int cityId) throws RemoteException, NamingException, CreateException, FinderException;
	public int createCity(int countryId, String name)throws RemoteException, NamingException, CreateException, FinderException;
	public int updateCity(int cityId,int countryId,String name)throws RemoteException, NamingException, CreateException, FinderException;
	public void removeCity(int cityId)throws RemoteException, NamingException, CreateException, FinderException;
	
	public CompanyDescriptor getCompanyDescriptor(int companyId) throws RemoteException, NamingException, CreateException, FinderException;
	public int createCompany(String name, int cityId, int sectorId)throws RemoteException, FinderException, NamingException, CreateException;
	public int updateCompany(int companyId, String name, int cityId, int sectorId)throws RemoteException, FinderException, NamingException, CreateException;
	public int cleanCompany(int companyId, boolean cleanStudents, boolean cleanRecruiters, boolean cleanSupervisors)throws RemoteException, FinderException, NamingException, CreateException;
	public void removeCompany(int companyId)throws RemoteException, FinderException, NamingException,RemoveException;
	
	public CompanySupDescriptor getCompanySupDescriptor(int userId) throws RemoteException, NamingException, CreateException, FinderException;
	public int createCompanySup(String firstName, String surName, String login, String password, String email,int companyId)throws RemoteException, FinderException, NamingException, CreateException;
	public int updateCompanySup(int userId, String firstName, String surName, String login, String password, String email,int companyId)throws RemoteException, FinderException, NamingException, CreateException;
	public void removeCompanySup(int userId)throws RemoteException, FinderException, NamingException,RemoveException;
	
	public CountryDescriptor getCountryDescriptor(int countryId) throws RemoteException, NamingException, CreateException, FinderException;
	public int createCountry(String name)throws RemoteException, NamingException, CreateException, FinderException;
	public int updateCountry(int countryId,String name)throws RemoteException, NamingException, CreateException, FinderException;
	public void removeCountry(int countryId)throws RemoteException, NamingException, CreateException, FinderException;
	
	
	public DegreeDescriptor getDegreeDescriptor(int degreeId) throws RemoteException, NamingException, CreateException, FinderException;
	public int createDegree(String name,String infos, int departementId)throws RemoteException, FinderException, NamingException, CreateException;
	public int updateDegree(int degreeId, String name, String info, int departmentId)throws RemoteException, FinderException, NamingException, CreateException;
	// TODO
	public int cleanDegree(int degreeId)throws RemoteException, FinderException, NamingException, CreateException;
	public void removeDegree(int degreeId)throws RemoteException, FinderException, NamingException,RemoveException;
	
	public MarkerDescriptor getMarkerDescriptor(int userId) throws RemoteException, NamingException, CreateException, FinderException;
	public int createMarker(String firstName, String surName, String login, String password, String email)throws RemoteException, FinderException, NamingException, CreateException;
	public int updateMarker(int userId, String firstName, String surName, String login, String password, String email)throws RemoteException, FinderException, NamingException, CreateException;
	public void removeMarker(int userId)throws RemoteException, FinderException, NamingException,RemoveException;
	
	
	
	
	public RecruiterDescriptor getRecruiterDescriptor(int userId) throws RemoteException, NamingException, CreateException, FinderException;
	public int createRecruiter(String firstName, String surName, String login, String password, String email,int companyId)throws RemoteException, FinderException, NamingException, CreateException;
	public int updateRecruiter(int userId, String firstName, String surName, String login, String password, String email,int companyId)throws RemoteException, FinderException, NamingException, CreateException;
	public void removeRecruiter(int userId)throws RemoteException, FinderException, NamingException,RemoveException;
	
	public StudentDescriptor getStudentDescriptor(int id) throws RemoteException, NamingException, CreateException, FinderException;
	public int createStudent(String firstName, String surName, String login, String password, String email, int degreeId)throws RemoteException, FinderException, NamingException, CreateException;
	public int updateStudent(int id, String firstName, String surName, String login, String password, String email, int degreeId)throws RemoteException, FinderException, NamingException, CreateException;
	public void removeStudent(int id)throws RemoteException, FinderException, NamingException,RemoveException;
	
	
	
}
